namespace FineCollection.Intf
{
    /// <summary>
    /// A list (write enabled).
    /// </summary>
    /// <typeparam name="T">type of an item.</typeparam>
    public interface WList<T> : RList<T>, WCollection<T>
    {
        /// <summary>
        /// Adds the specified item to the end of the list.
        /// </summary>
        /// <param name="item">item to add.</param>
        void Add(T item);

        /// <summary>
        /// Excludes the first item from the list.
        /// </summary>
        /// <returns>just excluded item.</returns>
        /// <remarks>The complexity of the operation depends on the implemetation.
        ///          Read the implementation remarks befor use.</remarks>
        /// <exception cref="CollectionIsEmptyException">when the list has no items.</exception>
        T ExcludeFirst();

        /// <summary>
        /// Excludes the last item from the list.
        /// </summary>
        /// <returns>just excluded item.</returns>
        /// <exception cref="CollectionIsEmptyException">when the list has no items.</exception>
        T ExcludeLast();

    }
}